# PythonLove

import turtle as love

# 导入pygame资源包
import pygame

love.setup(520, 520, 260, 260)  # 画布大小

love.hideturtle()

'''
love.speed(1)
love.forward(1000)
'''

# 音乐的路径
file = r'D:\Desktop\Working  Area\Python\Daily\Pycharm\venv\music\aa.mp3'
# 初始化
pygame.mixer.init()
# 加载音乐文件
pygame.mixer.music.load(file)
# 开始播放音乐流
pygame.mixer.music.play()

love.penup()

love.speed(1)
love.forward(600)

#  心形 画笔初始化

love.right(-90)
love.setpos(0, 150)
love.pencolor("red")
love.pensize(1)
#  love.delay(0)
love.speed(1)

love.pendown()

# 绘制 心形

for k in range(2):
    love.circle(92, 20)
for k in range(7):
    love.circle(160, 20)
for k in range(2):
    love.circle(320, 20)
for k in range(2):
    love.circle(800, 10.65)

love.left(57.27)
for k in range(2):
    love.circle(800, 10.65)
for k in range(2):
    love.circle(320, 20)
for k in range(7):
    love.circle(160, 20)
for k in range(2):
    love.circle(92, 20)

# I LOVE YOU 画笔初始化

love.penup()

love.setpos(-140, 80)
love.left(90)
love.pensize(3)
love.speed(1)

love.pendown()

# 绘制 I

love.forward(30)
love.left(180)
love.forward(15)
love.left(90)
love.forward(55)
love.penup()
love.right(90)
love.forward(15)
love.left(180)
love.pendown()
love.forward(30)
x = love.xcor()
# 绘制 LOVE

love.penup()

love.setpos(x + 30, 80)
love.right(90)

love.pendown()

love.forward(55)  # 绘制 L
love.left(90)
love.forward(20)
love.penup()  # 绘制 O
love.forward(10)
love.left(90)
love.forward(55)
love.right(90)
x = love.xcor()
y = love.ycor()
love.pendown()
love.forward(20)
love.right(90)
love.forward(55)
love.penup()
love.setpos(x, y)
love.pendown()
love.forward(55)
love.left(90)
love.forward(20)
love.penup()  # 绘制 V
love.forward(30)
love.left(105)
love.forward(55.80)
love.right(180)
love.pendown()
love.forward(55.80)
love.left(150)
love.forward(55.80)
love.penup()  # 绘制 E
love.right(75)
love.forward(15)
love.pendown()
love.forward(20)
love.backward(20)
love.right(90)
love.forward(55)
love.left(180)
love.forward(27.5)
love.right(90)
love.forward(17)
love.backward(17)
love.right(90)
love.forward(27.5)
love.left(90)
love.forward(19)
x = love.xcor()
#  绘制 YOU

love.penup()

love.setpos(x + 25, 80)
love.right(54.5)

love.pendown()

love.forward(30)  # 绘制 Y
x = love.xcor()
love.left(109)
love.forward(30)
love.right(180)
love.forward(30)
love.setpos(x, 25)
love.penup()  # 绘制 O
love.left(126.5)
love.forward(25)
love.left(90)
love.forward(55)
love.right(90)
x = love.xcor()
y = love.ycor()
love.pendown()
love.forward(20)
x1 = love.xcor()
y1 = love.ycor()
love.right(90)
love.forward(55)
love.penup()
love.setpos(x, y)
love.pendown()
love.forward(55)
love.left(90)
love.forward(20)
love.penup()  # 绘制 U
love.setpos(x1 + 15, y1)
love.right(90)
love.pendown()
love.forward(43)
love.circle(12, 180)
love.forward(43)

love.done()
